package com.neusoft.controller;

import com.neusoft.entity.Role;
import com.neusoft.service.RoleComsumerService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author whongf
 * @create 2020-06-08-20:14
 */
@RestController
@RequestMapping("role/feign")
public class RoleComsumerController {
    @Autowired
    private RoleComsumerService roleComsumerService;

    @PostMapping("queryAll")
    public Object queryAll(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit, @RequestBody Role role){
        return roleComsumerService.queryAll(page,limit,role);
    }

    @PostMapping("save")
    public Object save(@RequestBody Role role){
        return roleComsumerService.save(role);
    }
    @PostMapping("delete")
    public Object delete(@RequestBody Integer[] ids){
        return roleComsumerService.delete(ids);
    }
}
